Skip to contentSkip to conversation

pvops DomU kernels [was Re: "Hotplug Scripts not working ..." error on jaunty]

DISCUSSION Dulloor 4 participants 8 messages Oct 22, 2009 – Oct 24, 2009

Subsystems (2)
lore
Share & tools
lore

Dulloor

author
#0 lore raw

console/network/everything is fine with the 2.6.18 DomU (on pvops DomU and on Ubuntu 9.04 server). I assume it would be so with the any other forward port too (2.6.27, for instance).

The problem is with the pvops DomU kernel.
1. With Linus' git tree (CONFIG_XEN and other DomU options compiled in), the kernel crashes with the following (in xm dmesg) :
(XEN) mm.c:840:d33 Error getting mfn 18c3 (pfn 21603) from L1 entry 80000000018c3061 for l1e_owner=33, pg_owner=33
(XEN) traps.c:465:d33 Unhandled invalid opcode fault/trap [#6] on VCPU 0 [ec=0000]
(XEN) domain_crash_sync called from entry.S
(XEN) Domain 33 (vcpu#0) crashed on cpu#7:
(XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]----
(XEN) CPU: 7

2. With Jeremy's git, i.e the same kernel as Dom0 (but with CONFIG_XEN and other DomU options compiled in), the kernel just freezes in init_intel function (start_kernel->...->identify_boot_cpu->...->c_init). To be more precise, in detect_extended_topology function. Also, for the DomU, the init_intel function in "arch/x86/kernel/cpu/intel.c" gets executed rather than the function in "setup-xen.c". I am not well-versed the setup code in pvops. Does that look fine ?

I have attached the configs for both 1 and 2.

thanks
dulloor

PS : Also, DomU compilation (with just DomU options compiled in) fails with the following error, if CONFIG_SMP is not defined - arch/x86/kernel/pvclock.c: In function ‘pvclock_clocksource_vread’:
arch/x86/kernel/pvclock.c:172: error: implicit declaration of function ‘fix_to_virt’
arch/x86/kernel/pvclock.c:172: error: ‘FIX_PVCLOCK_TIME_INFO’ undeclared (first use in this function)
arch/x86/kernel/pvclock.c:172: error: (Each undeclared identifier is reported only once

Quoted 412 lines · Boris Derzhavets

I used to work with NAT for DomUs only on Fedoras 12,11,10,8 (libvirtd &
dnmask).
Due to absence libvirt ->xen driver on Ubuntu's Servers 9.04,8.10 i always configured
xen bridge via /etc/xen/xend-config.sxp. It works fine.

--- On *Tue, 10/20/09, Boris Derzhavets <[email protected]>* wrote:

From: Boris Derzhavets <[email protected]>
Subject: Re: [Xen-devel] Re: "Hotplug Scripts not working ..." error on jaunty
To: "Dulloor" <[email protected]>
Cc: "Xen-devel" <[email protected]>, "Marc - A. Dahlhaus" < [email protected]>
Date: Tuesday, October 20, 2009, 10:39 AM

You have to take care of hvc0 like tty1 entry under /etc/event.d on:
1. Ubuntu's <= 9.04 pv guest

# cd /etc/event.d
# cp tty1 hvc0
and edit hvc0 file correspondently
2. /etc/inittab on CentOS 5.3 DomU
should have entry
hvc0:23:respawn:...:hvc0
like for tty1,tty2 and etc

and so on, console=hvc0 at /boot/vmlinuz-xen module's line requires activating hvc0 via guest's specific location, view for instance :-

http://bderzhavets.wordpress.com/2009/05/21/install-ubuntu-jaunty-pv-hvm-domus-at-xen-3-4-dom0-kernel-2-6-30-rc6-tip/

or just tell exactly which one (linux) PV DomU is causing you trouble with serial console.

Boris.
P.S. F11, U 9.04 Server , OpenSuse 11.1(2) PV DomUs may loaded via vfb as well,but U 9.10 Server (beta) requires serial console

--- On *Tue, 10/20/09, Dulloor <[email protected]>* wrote:

From: Dulloor <[email protected]>
Subject: Re: [Xen-devel] Re: "Hotplug Scripts not working ..." error on jaunty
To: "Boris Derzhavets" <[email protected]>
Cc: "Xen-devel" <[email protected]>, "Marc - A. Dahlhaus" < [email protected]>
Date: Tuesday, October 20, 2009, 6:22 AM

Boris,

The "hotplug" error is gone with 9.04 server. The VMs boot fine (atleast per logs and xm list).

I am not able to access VM via console(hvc0) though. I have tried everything out there in your blogs, but the console just freezes at this same point :
"

[    0.010000] Initializing cgroup subsys memory
[    0.010000] Initializing cgroup subsys freezer

"
Any clues on how to go about debugging this ?

I use the default network-nat configuration for VMs(with addresses from 10.0.0.1/24). That doesn't work either. Is that expected too ? I am sure the bridge configuration should work though (will try tomorrow).

-dulloor

Quoted 23 lines · Boris Derzhavets
Quoted 1 line

I will try 9.04-Server (not sure if it will help though)

1. I believe it will help.
2. Bruce's Edge feed would be also very much wanted.

Boris.

--- On *Sun, 10/18/09, Dulloor <[email protected]>* wrote:

From: Dulloor <[email protected]>
Subject: Re: [Xen-devel] Re: "Hotplug Scripts not working ..." error on jaunty
To: "Boris Derzhavets" <[email protected]>
Cc: "Marc - A. Dahlhaus" <[email protected]>, "Xen-devel" < [email protected]>
Date: Sunday, October 18, 2009, 3:09 AM

I use xen-unstable (at the tip again). I have been following your blog. Thinking of it, the only difference is I use 9.04-Desktop-amd64 for my base installation. I will try 9.04-Server (not sure if it will help though). Btw, these VM images were working fine with 8.04 installation.

Quoted 301 lines

-dulloor

On Sun, Oct 18, 2009 at 3:00 AM, Boris Derzhavets <[email protected]<http://mc/[email protected]>

Quoted 295 lines

wrote:

Please, tell how you setup Xen 3.4.1 or Xen Unstable on 9.04 server ?

Boris.

P.S. Working sample:-

http://bderzhavets.wordpress.com/2009/06/25/setup-xen-3-4-1-dom0-on-top-of-ubuntu-9-04-server-via-marc-a-dahlhauss-udev-patch/

--- On *Sun, 10/18/09, Dulloor <[email protected]<http://mc/[email protected]>

Quoted 1 line · * wrote:

From: Dulloor <[email protected]<http://mc/[email protected]>

Quoted 1 line

Subject: Re: [Xen-devel] Re: "Hotplug Scripts not working ..." error on jaunty
To: "Boris Derzhavets" <[email protected]<http://mc/[email protected]>

Quoted 1 line

Cc: "Marc - A. Dahlhaus" <[email protected] <http://mc/[email protected]>>,
"Xen-devel" <[email protected]<http://mc/[email protected]>

Quoted 1 line

Date: Sunday, October 18, 2009, 1:37 AM

I am at the tip of xen/master branch of Jeremy's tree.

commit 2afad356210ac35cbbc81904e0ac8b514b7f6212
Merge: 9fa9003... 907d20f...
Author: Jeremy Fitzhardinge <[email protected]<http://mc/[email protected]>

Quoted 1 line

Date: Thu Oct 15 11:34:28 2009 -0700

Merge branch 'xen/vsyscall' into xen/master

* xen/vsyscall:
x86/vsyscall: fix 32-bit compile

-dulloor

Quoted 247 lines · On Sun, Oct 18, 2009 at 12:49 AM, Boris Derzhavets < [email protected]…
Quoted 3 lines
Quoted 2 lines · Boris Derzhavets

By some reasons i have to run on regular basis run

./xen-hotplug-cleanup

Quoted 4 lines
Quoted 4 lines

on two Xen 3.4.1 on top of Ubuntu 9.04 Servers patched systems to re-enable ability start DomUs without hotplug scripts failure.

Boris.

It was written on June 26, 2009 and was connected with some particular 9.04 instance.
Since then i did several Xen Host installs via official 3.4.1 tarball and via xen-unstable.hg but, every time the most recent JF's pvops kernel had been built to
support Dom0. Problem with hot-plug scripts was gone far away. My question :-
What kernel is supporting your Dom0 ?

Boris.
P.S. Seems to me , that was kernel related problem in June.

--- On *Sat, 10/17/09, Dulloor <[email protected]<http://mc/[email protected]>

Quoted 1 line · * wrote:

From: Dulloor <[email protected]<http://mc/[email protected]>

Quoted 1 line

Subject: [Xen-devel] Re: "Hotplug Scripts not working ..." error on
jaunty
To: "Marc - A. Dahlhaus" <[email protected] <http://mc/[email protected]>>
Cc: "Xen-devel" <[email protected]<http://mc/[email protected]>

Quoted 1 line

Date: Saturday, October 17, 2009, 6:08 PM

- udev version is 141 (udevadm info -V)

- There is only a /etc/udev directory. It had two files : xend.rules and xen-backend.rules. Removing them didn't help.

- I use pvops kernel. And, I use - make install-xen and make install-tools PYTHON_PREFIX_ARG=""

- Following is the output from "udevadm monitor" :

KERNEL[1255816932.742809] add      /devices/vbd-22-2049 (xen-backend)
KERNEL[1255816932.768878] add      /devices/vbd-22-2050 (xen-backend)
KERNEL[1255816932.786000] add      /devices/vbd-22-2051 (xen-backend)
KERNEL[1255816932.817227] add      /devices/vif-22-0 (xen-backend)
UDEV  [1255816932.818643] add      /devices/vif-22-0 (xen-backend)
KERNEL[1255816933.008654] add      /devices/console-22-0 (xen-backend)
UDEV  [1255816933.009916] add      /devices/console-22-0 (xen-backend)
UDEV  [1255816933.657785] add      /devices/vbd-22-2049 (xen-backend)
UDEV  [1255816934.707977] add      /devices/vbd-22-2050 (xen-backend)
UDEV  [1255816935.761811] add      /devices/vbd-22-2051 (xen-backend)
KERNEL[1255817033.248057] remove   /devices/console-22-0 (xen-backend)

------------- ****After the error****
UDEV [1255817033.334001] remove /devices/console-22-0 (xen-backend)

-dulloor

Quoted 8 lines · On Sat, Oct 17, 2009 at 4:04 PM, Marc - A. Dahlhaus…

Hello,

Quoted 3 lines · Dulloor

I see that these patches made it to xen-unstable, but I still see the "Hotplug Scripts not working ..." error on my jaunty dom0 machine.

The patches only fixed the build-time and installation-time detection

of

Quoted 3 lines

udev to work with version above of 124.

Have no jaunty based box around here to get some impressions of what

goes

Quoted 7 lines

wrong in this setup.

Could you check what udev version it has and if /etc/hotplug and/or /etc/udev contains xen related stuff?

As udev is in charge of hotplug events on jaunty a "udevadm monitor" might get you some further details on what events

are

Quoted 10 lines

generated.

Quoted 5 lines

I am trying to run a simple para-VM. xend starts fine (had to build tools with PYTHON_PREFIX_ARG set to ""). And, I tried xen-hotplug-cleanup too, but still getting the error.

Any ideas ?

Check what files get installed in /etc/udev and /etc/hotplug during installation. If you find anything xen related in /etc/hotplug remove

it and

Quoted 9 lines

check if that fixes your problem.

It would be interesting to know how you install xen...

Marc

Quoted 3 lines

-dulloor

On Sat, Jun 27, 2009 at 4:02 PM, Marc - A. Dahlhaus <[email protected]<http://mc/[email protected]>>

Quoted 7 lines · wrote:
Quoted 7 lines
Quoted 7 lines

Hello Boris,

as the problem you are describing is unrelated to the patch (which changes
the detection of udev during buildtime only),
can you please change the subject line to something more appropriate

and

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

give some additional details about the problem?

Marc

Quoted 1 line · Boris Derzhavets
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

By some reasons i have to run on regular basis run ./xen-hotplug-cleanup
on two Xen 3.4.1 on top of Ubuntu 9.04 Servers patched systems to re-enable ability start DomUs without hotplug scripts failure.

Boris.

--- On *Fri, 6/26/09, Marc - A. Dahlhaus [ Administration |

Westermann

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

GmbH ] /<[email protected] <http://mc/[email protected]>>/* wrote:

From: Marc - A. Dahlhaus [ Administration | Westermann GmbH ]
<[email protected] <http://mc/[email protected]>>
Subject: Re: [Xen-devel] [PATCH] Fix buildsystem to detect udev >
version 124
To: "Boris Derzhavets" <[email protected]<http://mc/[email protected]>

Cc "Xen-devel" <[email protected]<http://mc/[email protected]>>,

"Keir Fraser"

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

<[email protected]<http://mc/[email protected]>

Date: Friday, June 26, 2009, 5:12 AM

Could go into 3.4 and unstable IMO.

On 3.3 there is no tools/hotplug/Linux/Makefile so it must be

altered

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

there to use tools/examples/Makefile for the first chunk and should work
fine there.

Marc

Am Donnerstag, den 25.06.2009, 20:03 -0700 schrieb Boris

Derzhavets:

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 7 lines

Where this patch is supposed to go either xen-unstable.hg or xen-3.4-testing.hg (both) ?
Systems affected Ubuntu 9.04 (now) , F12 (pretty soon).

Boris

--- On Wed, 6/24/09, Marc - A. Dahlhaus [ Administration |

Westermann

Quoted 1 line

GmbH ] <[email protected] <http://mc/[email protected]></mc/compose?to=

Quoted 1 line · [email protected] <http://mc/[email protected]>>> wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

> From: Marc - A. Dahlhaus [ Administration

|

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Westermann
GmbH ]

Quoted 1 line
        <[email protected] <http://mc/[email protected]></mc/compose?to=

[email protected] <http://mc/[email protected]>>>

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 1 line

Subject: [Xen-devel] [PATCH] Fix buildsystem to detect

udev >

Quoted 2 lines

version 124
To: "Xen-devel" <[email protected]<http://mc/[email protected]>

</mc/[email protected]<http://mc/[email protected]>

Quoted 1 line
Cc "Daniel Schroeder" <[email protected]<http://mc/[email protected]>

</mc/[email protected]<http://mc/[email protected]>>>,

"Keir Fraser"

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line

<[email protected]<http://mc/[email protected]>

</mc/[email protected]<http://mc/[email protected]>

Quoted 2 lines

Date: Wednesday, June 24, 2009, 12:26 PM
> udev removed the udevinfo symlink from

versions

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

higher than

Quoted 2 lines

123 and xens
build-system could not detect if udev is in place and

has the

Quoted 3 lines

required
version. Attached patch fixes this.
> > Signed-off-by: Marc-A.

Dahlhaus

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

<[email protected] <http://mc/[email protected]>
</mc/[email protected] <http://mc/[email protected]>>>

Quoted 1 line

> > > >

-----Inline Attachment Follows-----

Quoted 1 line
           >

_______________________________________________

Quoted 19 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 2 lines

Xen-devel mailing list [email protected]<http://mc/[email protected]>

</mc/[email protected]<http://mc/[email protected]>

Quoted 5 lines
        http://lists.xensource.com/xen-devel
           >

_______________________________________________
Xen-devel mailing list [email protected]<http://mc/[email protected]>

</mc/[email protected]<http://mc/[email protected]>

Quoted 1 line

http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list [email protected]<http://mc/[email protected]> </mc/[email protected]<http://mc/[email protected]>

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

http://lists.xensource.com/xen-devel

------------------------------------------------------------------------

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

_______________________________________________
Xen-devel mailing list [email protected]<http://mc/[email protected]>
http://lists.xensource.com/xen-devel

Quoted 7 lines
Quoted 5 lines
Quoted 5 lines

_______________________________________________
Xen-devel mailing list [email protected]<http://mc/[email protected]>
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list [email protected]<http://mc/[email protected]>
http://lists.xensource.com/xen-devel

-----Inline Attachment Follows-----

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Quoted 9 lines

-----Inline Attachment Follows-----

_______________________________________________
Xen-devel mailing list [email protected]<http://mc/[email protected]>
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 1 line

The problem is with the pvops DomU kernel.

It works not only for xenified ( Xen Dom0 support forward ported kernels)  aka Suse 2.6.27,2.6.29.4, 2.6.31.4 kernels

F11,F10,Ubuntu 8.10,9.04 Servers PV DomUs have been setup with no problems at the same Dom0. Mentioned  kernels have Xen DomU Support via mainline Linux, but they are not obviously pvops enabled kernels.

Boris.

--- On Thu, 10/22/09, Dulloor <[email protected]> wrote:

From: Dulloor <[email protected]>
Subject: [Xen-devel] pvops DomU kernels [was Re: "Hotplug Scripts not working ..." error on jaunty]
To: "Boris Derzhavets" <[email protected]>
Cc: "Xen-devel" <[email protected]>, "Marc - A. Dahlhaus" <[email protected]>
Date: Thursday, October 22, 2009, 1:56 AM

console/network/everything is fine with the 2.6.18 DomU (on pvops DomU and on Ubuntu 9.04 server). I assume it would be so with the any other forward port too (2.6.27, for instance).

The problem is with the pvops DomU kernel.

1. With Linus' git tree (CONFIG_XEN and other DomU options compiled in), the kernel crashes with the following (in xm dmesg) :
(XEN) mm.c:840:d33 Error getting mfn 18c3 (pfn 21603) from L1 entry 80000000018c3061 for l1e_owner=33, pg_owner=33

(XEN) traps.c:465:d33 Unhandled invalid opcode fault/trap [#6] on VCPU 0 [ec=0000] (XEN) domain_crash_sync called from entry.S
(XEN) Domain 33 (vcpu#0) crashed on cpu#7:
(XEN) ----[ Xen-3.5-unstable  x86_64  debug=y  Not tainted ]----

(XEN) CPU:    7

2. With Jeremy's git, i.e the same kernel as Dom0 (but with CONFIG_XEN and other DomU options compiled in), the kernel just freezes in init_intel function (start_kernel->...->identify_boot_cpu->...->c_init). To be more precise, in detect_extended_topology function. Also, for the DomU, the init_intel function in "arch/x86/kernel/cpu/intel.c" gets executed rather than the function in "setup-xen.c". I am not well-versed the setup code in pvops. Does that look fine ?

I have attached the configs for both 1 and 2.

thanks
dulloor

PS : Also, DomU compilation (with just DomU options compiled in) fails with the following error, if CONFIG_SMP is not defined - arch/x86/kernel/pvclock.c: In function ‘pvclock_clocksource_vread’:

arch/x86/kernel/pvclock.c:172: error: implicit declaration of function ‘fix_to_virt’ arch/x86/kernel/pvclock.c:172: error: ‘FIX_PVCLOCK_TIME_INFO’ undeclared (first use in this function) arch/x86/kernel/pvclock.c:172: error: (Each undeclared identifier is reported only once

On Tue, Oct 20, 2009 at 11:23 AM, Boris Derzhavets <[email protected]> wrote:

I used to work with NAT for DomUs only on Fedoras 12,11,10,8 (libvirtd & dnmask). Due to absence libvirt ->xen driver on Ubuntu's Servers 9.04,8.10 i always configured xen bridge via /etc/xen/xend-config.sxp. It works fine.

--- On Tue, 10/20/09, Boris Derzhavets <[email protected]> wrote:

From: Boris Derzhavets <[email protected]>
Subject: Re: [Xen-devel] Re: "Hotplug Scripts not working ..." error on jaunty

To: "Dulloor" <[email protected]>
Cc: "Xen-devel" <[email protected]>, "Marc - A. Dahlhaus" <[email protected]>

Date: Tuesday, October 20, 2009, 10:39 AM

You have to take care of hvc0 like tty1 entry under /etc/event.d on:
1. Ubuntu's <= 9.04 pv guest

# cd /etc/event.d
# cp tty1 hvc0
and edit hvc0 file correspondently
2. /etc/inittab on CentOS 5.3 DomU

should have entry
hvc0:23:respawn:...:hvc0
like for tty1,tty2 and etc

and so on,  console=hvc0 at /boot/vmlinuz-xen  module's line requires activating hvc0 via guest's specific location, view for instance :-

http://bderzhavets.wordpress.com/2009/05/21/install-ubuntu-jaunty-pv-hvm-domus-at-xen-3-4-dom0-kernel-2-6-30-rc6-tip/

or just tell exactly which one (linux) PV DomU is causing you trouble with serial console.

Boris.
P.S. F11, U 9.04 Server , OpenSuse 11.1(2)  PV DomUs may loaded
via vfb as well,but U 9.10 Server (beta) requires serial console

--- On Tue,
10/20/09, Dulloor <[email protected]> wrote:

From: Dulloor <[email protected]>
Subject: Re: [Xen-devel] Re: "Hotplug Scripts not working ..." error on jaunty
To: "Boris Derzhavets" <[email protected]>

Cc "Xen-devel" <[email protected]>, "Marc - A. Dahlhaus" <[email protected]>

Date: Tuesday, October 20, 2009, 6:22 AM

Boris,

The "hotplug" error is gone with 9.04 server. The VMs boot fine (atleast per logs and xm list).

I am not able to access VM via console(hvc0) though. I have tried everything out there in your blogs, but the console just freezes at this same point :

"
[    0.010000] Initializing cgroup subsys memory
[    0.010000] Initializing cgroup subsys freezer
"
Any clues on how to go about debugging this ?

I use the default network-nat configuration for VMs(with addresses from 10.0.0.1/24). That doesn't work either. Is that expected too ?

I am sure the bridge configuration should work though (will try tomorrow).

-dulloor

Quoted 1 line · Boris Derzhavets

I will try 9.04-Server (not sure if it will help though)

1. I believe it will help.
2. Bruce's  Edge feed would be also very much wanted.

Boris.

--- On Sun, 10/18/09, Dulloor <[email protected]> wrote:

From: Dulloor <[email protected]>

Subject: Re: [Xen-devel] Re: "Hotplug Scripts not working ..." error on jaunty
To: "Boris Derzhavets" <[email protected]>
Cc: "Marc - A. Dahlhaus" <[email protected]>, "Xen-devel" <[email protected]>

Date: Sunday, October 18, 2009, 3:09 AM

I use xen-unstable (at the tip again). I have been following your blog. Thinking of it, the only difference is I use 9.04-Desktop-amd64 for my base installation. I
will try 9.04-Server (not sure if it will help though). Btw, these VM images were working fine with 8.04 installation.

-dulloor

On Sun, Oct 18, 2009 at 3:00 AM, Boris Derzhavets <[email protected]> wrote:

Please, tell how you setup Xen 3.4.1 or Xen  Unstable on 9.04 server ?

Boris.

P.S. Working sample:-

http://bderzhavets.wordpress.com/2009/06/25/setup-xen-3-4-1-dom0-on-top-of-ubuntu-9-04-server-via-marc-a-dahlhauss-udev-patch/

--- On Sun, 10/18/09, Dulloor <[email protected]> wrote:

From: Dulloor <[email protected]>
Subject: Re: [Xen-devel] Re: "Hotplug Scripts not working ..." error on jaunty

To: "Boris Derzhavets" <[email protected]>
Cc: "Marc - A. Dahlhaus" <[email protected]>, "Xen-devel" <[email protected]>

Date: Sunday, October 18, 2009, 1:37 AM

I am at the tip of xen/master branch of Jeremy's tree.

commit
2afad356210ac35cbbc81904e0ac8b514b7f6212
Merge: 9fa9003... 907d20f...
Author: Jeremy Fitzhardinge <[email protected]>

Date:   Thu Oct 15 11:34:28 2009 -0700

    Merge branch 'xen/vsyscall' into xen/master

    * xen/vsyscall:
      x86/vsyscall: fix 32-bit compile

-dulloor

Quoted 8 lines · Boris Derzhavets
Quoted 7 lines · Boris Derzhavets

By some reasons i have to run  on regular basis run ./xen-hotplug-cleanup on two Xen 3.4.1 on top of Ubuntu 9.04 Servers patched systems to

re-enable ability start DomUs without hotplug scripts failure.

Boris.

It  was written on June 26, 2009 and was connected with some particular 9.04 instance.
Since then i did several Xen Host installs via official 3.4.1  tarball and via xen-unstable.hg  but, every time the most recent JF's pvops kernel had been built to

support Dom0. Problem with hot-plug scripts was gone far away. My question :-
What kernel is supporting your Dom0 ?

Boris.
P.S. Seems to me , that was kernel related problem in June.

--- On Sat, 10/17/09, Dulloor <[email protected]>
wrote:

From: Dulloor <[email protected]>

Subject: [Xen-devel] Re: "Hotplug Scripts not working ..." error on jaunty

To: "Marc - A. Dahlhaus" <[email protected]>
Cc: "Xen-devel" <[email protected]>

Date: Saturday, October 17, 2009, 6:08 PM

- udev version is 141 (udevadm info -V)

- There is only a /etc/udev directory. It had two files : xend.rules and xen-backend.rules. Removing them didn't help.

- I use pvops kernel. And, I use - make install-xen and make install-tools PYTHON_PREFIX_ARG=""

- Following is the output from "udevadm monitor" :
KERNEL[1255816932.742809] add      /devices/vbd-22-2049 (xen-backend)

KERNEL[1255816932.768878] add      /devices/vbd-22-2050 (xen-backend) KERNEL[1255816932.786000] add
  /devices/vbd-22-2051 (xen-backend)
KERNEL[1255816932.817227] add      /devices/vif-22-0 (xen-backend) UDEV  [1255816932.818643] add      /devices/vif-22-0 (xen-backend) KERNEL[1255816933.008654] add      /devices/console-22-0 (xen-backend)

UDEV  [1255816933.009916] add      /devices/console-22-0 (xen-backend) UDEV  [1255816933.657785] add      /devices/vbd-22-2049 (xen-backend) UDEV  [1255816934.707977] add      /devices/vbd-22-2050 (xen-backend)

UDEV  [1255816935.761811] add      /devices/vbd-22-2051 (xen-backend)

KERNEL[1255817033.248057] remove   /devices/console-22-0 (xen-backend) ------------- ****After the error****
UDEV  [1255817033.334001] remove   /devices/console-22-0 (xen-backend)

-dulloor

Quoted 34 lines · Marc - A. Dahlhaus

Hello,

Quoted 9 lines · Dulloor

I see that these patches made it to xen-unstable, but I still see the

"Hotplug Scripts not working ..." error on my jaunty dom0 machine.

The patches only fixed the build-time and installation-time detection of udev to work with version above of 124.

Have no jaunty based box around here to get some impressions of what goes wrong in this setup.

Could you check what udev version it has and if /etc/hotplug and/or /etc/udev contains xen related stuff?

Quoted 5 lines

As udev is in charge of hotplug events on jaunty a
"udevadm monitor" might get you some further details on what events are generated.

Quoted 1 line

I am trying to run a simple para-VM. xend starts fine (had

to build

Quoted 12 lines
Quoted 4 lines

tools with PYTHON_PREFIX_ARG set to ""). And, I tried xen-hotplug-cleanup too, but still getting the error.

Any ideas ?

Check what files get installed in /etc/udev and /etc/hotplug during

Quoted 29 lines

installation. If you find anything xen related in /etc/hotplug remove it and check if that fixes your problem.

It would be interesting to know how you install xen...

Marc

Quoted 16 lines

-dulloor

Quoted 13 lines · Marc - A. Dahlhaus

Hello Boris,

as the problem you are describing is unrelated to the patch (which changes
the detection of udev during buildtime only),
can you please change the subject line to

something more appropriate and

Quoted 61 lines
Quoted 55 lines
Quoted 55 lines

give some additional details about the problem?

Marc

Quoted 49 lines · Boris Derzhavets

By some reasons i have to run  on regular basis run ./xen-hotplug-cleanup
on two Xen 3.4.1 on top of Ubuntu 9.04 Servers patched systems to re-enable ability start DomUs without hotplug scripts failure.

Boris.

--- On *Fri, 6/26/09, Marc - A. Dahlhaus [ Administration | Westermann GmbH ] /<[email protected]>/* wrote:

  From: Marc - A. Dahlhaus [ Administration | Westermann GmbH ] <[email protected]>

  Subject: Re: [Xen-devel] [PATCH] Fix buildsystem to detect udev > version 124
  To: "Boris Derzhavets" <[email protected]>

  Cc: "Xen-devel" <[email protected]>, "Keir Fraser" <[email protected]>

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

  Date: Friday, June 26, 2009, 5:12 AM

  Could go into 3.4 and unstable IMO.

  On 3.3 there is no

tools/hotplug/Linux/Makefile so it must be altered

Quoted 95 lines
Quoted 89 lines
Quoted 89 lines
Quoted 89 lines

  there to use tools/examples/Makefile for the first chunk and should work
  fine there.

  Marc

  Am Donnerstag, den 25.06.2009, 20:03 -0700 schrieb Boris Derzhavets:
  > Where this patch is supposed to go either xen-unstable.hg or

  > xen-3.4-testing.hg (both) ?
  > Systems affected Ubuntu 9.04 (now) , F12 (pretty soon). >
  > Boris
  >

  > --- On Wed, 6/24/09, Marc - A. Dahlhaus [ Administration | Westermann
  > GmbH ] <[email protected] </mc/[email protected]>> wrote:

  >            >         From: Marc - A. Dahlhaus [ Administration | Westermann
  GmbH ]
  >         <[email protected] </mc/[email protected]>>

  >         Subject: [Xen-devel] [PATCH] Fix buildsystem to detect udev >
  >         version 124
  >         To: "Xen-devel" <[email protected]

  </mc/[email protected]>> >         Cc: "Daniel Schroeder" <[email protected]

  </mc/[email protected]>>, "Keir Fraser" >         <[email protected]

  </mc/[email protected]>> >         Date: Wednesday, June 24, 2009, 12:26 PM

  >            >         udev removed the udevinfo symlink from versions higher than
  >         123 and xens
  >         build-system could not detect if udev is in place and

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

  has the
  >         required
  >         version. Attached patch fixes this.
  >            >            >

Signed-off-by Marc-A. Dahlhaus
Quoted 63 lines
Quoted 57 lines
Quoted 57 lines
Quoted 57 lines

<[email protected]
  </mc/[email protected]>>

  >            >            >            >            > -----Inline Attachment Follows-----
  >            >         _______________________________________________

  >         Xen-devel mailing list
  >         [email protected]
  </mc/[email protected]>

  >         http://lists.xensource.com/xen-devel
  >            >
  > _______________________________________________

  > Xen-devel mailing list
  > [email protected]
  </mc/[email protected]>

  > http://lists.xensource.com/xen-devel

  _______________________________________________

  Xen-devel mailing list
  [email protected]
  </mc/[email protected]>

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

  http://lists.xensource.com/xen-devel

------------------------------------------------------------------------

Quoted 20 lines
Quoted 19 lines
Quoted 19 lines
Quoted 10 lines

_______________________________________________
Xen-devel mailing list
[email protected]

Quoted 2 lines

http://lists.xensource.com/xen-devel

_______________________________________________

Xen-devel mailing list

Quoted 11 lines
Quoted 9 lines
Quoted 9 lines

[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]

http://lists.xensource.com/xen-devel

-----Inline Attachment Follows-----

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

-----Inline Attachment Follows-----

_______________________________________________
Xen-devel mailing list
[email protected]

http://lists.xensource.com/xen-devel

-----Inline Attachment Follows-----

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw
In reply to Dulloor
Quoted 4 lines · Dulloor

console/network/everything is fine with the 2.6.18 DomU (on pvops DomU and on Ubuntu 9.04 server). I assume it would be so with the any other forward port too (2.6.27, for instance).

Quoted 11 lines

The problem is with the pvops DomU kernel.
1. With Linus' git tree (CONFIG_XEN and other DomU options compiled in), the kernel crashes with the following (in xm dmesg) :
(XEN) mm.c:840:d33 Error getting mfn 18c3 (pfn 21603) from L1 entry 80000000018c3061 for l1e_owner=33, pg_owner=33
(XEN) traps.c:465:d33 Unhandled invalid opcode fault/trap [#6] on VCPU 0 [ec=0000]
(XEN) domain_crash_sync called from entry.S
(XEN) Domain 33 (vcpu#0) crashed on cpu#7:
(XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]----
(XEN) CPU: 7

Where in the boot does this happen? Does anything appear on the Linux console? Is there a rip/eip you can map to a kernel symbol?

Quoted 8 lines

2. With Jeremy's git, i.e the same kernel as Dom0 (but with CONFIG_XEN and other DomU options compiled in), the kernel just freezes in init_intel function (start_kernel->...->identify_boot_cpu->...->c_init). To be more precise, in detect_extended_topology function. Also, for the DomU, the init_intel function in "arch/x86/kernel/cpu/intel.c" gets executed rather than the function in "setup-xen.c". I am not well-versed the setup code in pvops. Does that look fine ?

Which setup-xen.c would that be? The normal CPU setup is supposed to be run, but the extended topology info is rather meaningless in a Xen guest. I think the right answer is to knobble it in xen_cpuid(), assuming it isn't stuff that Xen should be suppressing. Does this work?

arch/x86/xen/enlighten.c +7 -0
index fb7ebc6..ecb9b0d 100644
@@ -186,6 +186,7 @@ static __read_mostly unsigned int cpuid_leaf81_edx_mask = ~0;
 static void xen_cpuid(unsigned int *ax, unsigned int *bx,
 		      unsigned int *cx, unsigned int *dx)
 {
+	unsigned maskebx = ~0;
 	unsigned maskecx = ~0;
 	unsigned maskedx = ~0;
 
@@ -199,6 +200,11 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx,
 		maskedx = cpuid_leaf1_edx_mask;
 		break;
 
+	case 0xb:
+		/* Suppress extended topology stuff */
+		maskebx = 0;
+		break;
+
 	case 0x80000001:
 		maskedx = cpuid_leaf81_edx_mask;
 		break;
@@ -211,6 +217,7 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx,
 		  "=d" (*dx)
 		: "0" (*ax), "2" (*cx));
 
+	*bx &= maskebx;
 	*cx &= maskecx;
 	*dx &= maskedx;
 }
Quoted 6 lines

I have attached the configs for both 1 and 2.

thanks
dulloor

Quoted 9 lines

PS : Also, DomU compilation (with just DomU options compiled in) fails with the following error, if CONFIG_SMP is not defined - arch/x86/kernel/pvclock.c: In function ‘pvclock_clocksource_vread’:
arch/x86/kernel/pvclock.c:172: error: implicit declaration of function ‘fix_to_virt’
arch/x86/kernel/pvclock.c:172: error: ‘FIX_PVCLOCK_TIME_INFO’ undeclared (first use in this function) arch/x86/kernel/pvclock.c:172: error: (Each undeclared identifier is reported only once

Does this fix it?

arch/x86/kernel/pvclock.c +1 -0
index 0bed867..f47f91e 100644
@@ -21,6 +21,7 @@
 
 #include <asm/pvclock.h>
 #include <asm/vsyscall.h>
+#include <asm/fixmap.h>
 #include <asm/vgtod.h>
 
 /*

J

author
#3 lore raw

* jeremy pvops git (with SMP) - Your patch works. I had commented out detect_extended_topology as a work-around.

* jeremy pvops git (without SMP) - Build fails at link time, since "register_task_migration_notifier" definition is guarded by CONFIG_SMP (rightly so). This function is used in pvclock_init_vsyscall. Should the call in pvclock_init_vsyscall be guarded by CONFIG_SMP or should another "dummy" version of register_task_migration_notifier be defined for !CONFIG_SMP.

* Linus' git - Nothing on Linux console. Crash rip [BUG()] - (gdb) x/i 0xffffffff818da4ee
0xffffffff818da4ee <xen_load_gdt_boot+272>: ud2a

Crash is because HYPERVISOR_update_va_mapping fails.

I have attached the "xm dmesg", which also shows the error(in mm.c) leading to the crash. If you can't think of any existing problem, I will spend time debugging tomorrow.

-dulloor

Quoted 101 lines · Jeremy Fitzhardinge
Quoted 4 lines · Dulloor

console/network/everything is fine with the 2.6.18 DomU (on pvops DomU and on Ubuntu 9.04 server). I assume it would be so with the any other forward port too (2.6.27, for instance).

Quoted 11 lines

The problem is with the pvops DomU kernel.
1. With Linus' git tree (CONFIG_XEN and other DomU options compiled in), the kernel crashes with the following (in xm dmesg) :
(XEN) mm.c:840:d33 Error getting mfn 18c3 (pfn 21603) from L1 entry 80000000018c3061 for l1e_owner=33, pg_owner=33
(XEN) traps.c:465:d33 Unhandled invalid opcode fault/trap [#6] on VCPU 0 [ec=0000]
(XEN) domain_crash_sync called from entry.S
(XEN) Domain 33 (vcpu#0) crashed on cpu#7:
(XEN) ----[ Xen-3.5-unstable  x86_64  debug=y  Not tainted ]---- (XEN) CPU:    7

Where in the boot does this happen?  Does anything appear on the Linux console?  Is there a rip/eip you can map to a kernel symbol?

Quoted 8 lines

2. With Jeremy's git, i.e the same kernel as Dom0 (but with CONFIG_XEN and other DomU options compiled in), the kernel just freezes in init_intel function (start_kernel->...->identify_boot_cpu->...->c_init). To be more precise, in detect_extended_topology function. Also, for the DomU, the init_intel function in "arch/x86/kernel/cpu/intel.c" gets executed rather than the function in "setup-xen.c". I am not well-versed the setup code in pvops. Does that look fine ?

Which setup-xen.c would that be?  The normal CPU setup is supposed to be run, but the extended topology info is rather meaningless in a Xen guest.  I think the right answer is to knobble it in xen_cpuid(), assuming it isn't stuff that Xen should be suppressing.  Does this work?

arch/x86/xen/enlighten.c +6 -0
index fb7ebc6..ecb9b0d 100644
@@ -186,6 +186,7 @@ static __read_mostly unsigned int cpuid_leaf81_edx_mask = ~0;
  static void xen_cpuid(unsigned int *ax, unsigned int *bx,
                      unsigned int *cx, unsigned int *dx)
  {
+       unsigned maskebx = ~0;
        unsigned maskecx = ~0;
        unsigned maskedx = ~0;
 
@@ -199,6 +200,11 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx,
                maskedx = cpuid_leaf1_edx_mask;
                break;
 
+       case 0xb:
+               /* Suppress extended topology stuff */
+               maskebx = 0;
+               break;
+

       case 0x80000001:
               maskedx = cpuid_leaf81_edx_mask;
               break;

arch/x86/xen/enlighten.c +1 -0
@@ -211,6 +217,7 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx,
                  "=d" (*dx)
                : "0" (*ax), "2" (*cx));
 
+       *bx &= maskebx;
        *cx &= maskecx;
        *dx &= maskedx;
  }
Quoted 9 lines

I have attached the configs for both 1 and 2.

thanks
dulloor

Quoted 9 lines

PS : Also, DomU compilation (with just DomU options compiled in) fails with the following error, if CONFIG_SMP is not defined - arch/x86/kernel/pvclock.c: In function ‘pvclock_clocksource_vread’:
arch/x86/kernel/pvclock.c:172: error: implicit declaration of function ‘fix_to_virt’
arch/x86/kernel/pvclock.c:172: error: ‘FIX_PVCLOCK_TIME_INFO’ undeclared (first use in this function) arch/x86/kernel/pvclock.c:172: error: (Each undeclared identifier is reported only once

Does this fix it?

arch/x86/kernel/pvclock.c +1 -0
index 0bed867..f47f91e 100644
@@ -21,6 +21,7 @@
 
  #include <asm/pvclock.h>
  #include <asm/vsyscall.h>
+#include <asm/fixmap.h>
  #include <asm/vgtod.h>
 
  /*
Quoted 3 lines

       J

(XEN) mm.c:840:d33 Error getting mfn 18c3 (pfn 21603) from L1 entry 80000000018c3061 for l1e_owner=33, pg_owner=33 (XEN) traps.c:465:d33 Unhandled invalid opcode fault/trap [#6] on VCPU 0 [ec=0000]
(XEN) domain_crash_sync called from entry.S
(XEN) Domain 33 (vcpu#0) crashed on cpu#7:
(XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]----
(XEN) CPU: 7
(XEN) RIP: e033:[<ffffffff818da4ee>]
(XEN) RFLAGS: 0000000000000282 EM: 1 CONTEXT: pv guest

(XEN) rax: 00000000ffffffea   rbx: 80000000018c3061   rcx: 000000000017acf9
(XEN) rdx: 00000000deadbeef   rsi: 00000000deadbeef   rdi: 00000000deadbeef
(XEN) rbp: ffffffff8178dfa8   rsp: ffffffff8178df08   r8:  0000000000000000
(XEN) r9:  0000000000000000   r10: 0000000000000000   r11: 0000000000000000
(XEN) r12: ffffffff818c3000   r13: 0000000000000000   r14: ffffffff8178df50
(XEN) r15: 0000000000000080   cr0: 000000008005003b   cr4: 00000000000026f4
(XEN) cr3: 0000000139b61000   cr2: 0000000000000000
(XEN) ds: 0000   es: 0000   fs: 0000   gs: 0000   ss: e02b   cs: e033
(XEN) Guest stack trace from rsp=ffffffff8178df08:
(XEN)    000000000017acf9 0000000000000000 ffffffff818da4ee 000000010000e030
(XEN)    0000000000010082 ffffffff8178df48 000000000000e02b ffffffff818da488
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 ffffffff8178dfb8 0000008000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    ffffffff8178dfd8 ffffffff81020c82 ffff818c3000007f ffffffff818dffff
(XEN)    0000000000000000 0000000000000000 ffffffff8178dff8 ffffffff818da0c7
(XEN)    0000000000000000 0000000000000000 0000000000000000 ffffffff8bff8000
(XEN)    ffffffff8bff9000 ffffffff8bffa000 ffffffff8bffb000 ffffffff8bffc000
(XEN)    ffffffff8bffd000 ffffffff8bffe000 ffffffff8bfff000 ffffffff8c000000
(XEN)    ffffffff8c001000 ffffffff8c002000 ffffffff8c003000 ffffffff8c004000
(XEN)    ffffffff8c005000 ffffffff8c006000 ffffffff8c007000 ffffffff8c008000
(XEN)    ffffffff8c009000 ffffffff8c00a000 ffffffff8c00b000 ffffffff8c00c000
(XEN)    ffffffff8c00d000 ffffffff8c00e000 ffffffff8c00f000 ffffffff8c010000
(XEN)    ffffffff8c011000 ffffffff8c012000 ffffffff8c013000 ffffffff8c014000
(XEN)    ffffffff8c015000 ffffffff8c016000 ffffffff8c017000 ffffffff8c018000
(XEN)    ffffffff8c019000 ffffffff8c01a000 ffffffff8c01b000 ffffffff8c01c000
(XEN)    ffffffff8c01d000 ffffffff8c01e000 ffffffff8c01f000 ffffffff8c020000
(XEN)    ffffffff8c021000 ffffffff8c022000 ffffffff8c023000 ffffffff8c024000
(XEN)    ffffffff8c025000 ffffffff8c026000 ffffffff8c027000 ffffffff8c028000

(XEN) mm.c:840:d39 Error getting mfn 18c3 (pfn 21603) from L1 entry 80000000018c3061 for l1e_owner=39, pg_owner=39 (XEN) traps.c:465:d39 Unhandled invalid opcode fault/trap [#6] on VCPU 0 [ec=0000]
(XEN) domain_crash_sync called from entry.S
(XEN) Domain 39 (vcpu#0) crashed on cpu#15:
(XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]----
(XEN) CPU: 15
(XEN) RIP: e033:[<ffffffff818da4ee>]
(XEN) RFLAGS: 0000000000000282 EM: 1 CONTEXT: pv guest

(XEN) rax: 00000000ffffffea   rbx: 80000000018c3061   rcx: 00000000001ee819
(XEN) rdx: 00000000deadbeef   rsi: 00000000deadbeef   rdi: 00000000deadbeef
(XEN) rbp: ffffffff8178dfa8   rsp: ffffffff8178df08   r8:  0000000000000000
(XEN) r9:  0000000000000000   r10: 0000000000000000   r11: 0000000000000000
(XEN) r12: ffffffff818c3000   r13: 0000000000000000   r14: ffffffff8178df50
(XEN) r15: 0000000000000080   cr0: 000000008005003b   cr4: 00000000000026f4
(XEN) cr3: 0000000171361000   cr2: 0000000000000000
(XEN) ds: 0000   es: 0000   fs: 0000   gs: 0000   ss: e02b   cs: e033
(XEN) Guest stack trace from rsp=ffffffff8178df08:
(XEN)    00000000001ee819 0000000000000000 ffffffff818da4ee 000000010000e030
(XEN)    0000000000010082 ffffffff8178df48 000000000000e02b ffffffff818da488
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 ffffffff8178dfb8 0000008000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    ffffffff8178dfd8 ffffffff81020c82 ffff818c3000007f ffffffff818dffff
(XEN)    0000000000000000 0000000000000000 ffffffff8178dff8 ffffffff818da0c7
(XEN)    0000000000000000 0000000000000000 0000000000000000 ffffffff8bff8000
(XEN)    ffffffff8bff9000 ffffffff8bffa000 ffffffff8bffb000 ffffffff8bffc000
(XEN)    ffffffff8bffd000 ffffffff8bffe000 ffffffff8bfff000 ffffffff8c000000
(XEN)    ffffffff8c001000 ffffffff8c002000 ffffffff8c003000 ffffffff8c004000
(XEN)    ffffffff8c005000 ffffffff8c006000 ffffffff8c007000 ffffffff8c008000
(XEN)    ffffffff8c009000 ffffffff8c00a000 ffffffff8c00b000 ffffffff8c00c000
(XEN)    ffffffff8c00d000 ffffffff8c00e000 ffffffff8c00f000 ffffffff8c010000
(XEN)    ffffffff8c011000 ffffffff8c012000 ffffffff8c013000 ffffffff8c014000
(XEN)    ffffffff8c015000 ffffffff8c016000 ffffffff8c017000 ffffffff8c018000
(XEN)    ffffffff8c019000 ffffffff8c01a000 ffffffff8c01b000 ffffffff8c01c000
(XEN)    ffffffff8c01d000 ffffffff8c01e000 ffffffff8c01f000 ffffffff8c020000
(XEN)    ffffffff8c021000 ffffffff8c022000 ffffffff8c023000 ffffffff8c024000
(XEN)    ffffffff8c025000 ffffffff8c026000 ffffffff8c027000 ffffffff8c028000

(XEN) traps.c:465:d40 Unhandled general protection fault fault/trap [#13] on VCPU 0 [ec=0000] (XEN) domain_crash_sync called from entry.S
(XEN) Domain 40 (vcpu#0) crashed on cpu#9:
(XEN) ----[ Xen-3.5-unstable x86_64 debug=y Not tainted ]----
(XEN) CPU: 9
(XEN) RIP: e033:[<ffffffff81034a14>]
(XEN) RFLAGS: 0000000000000282 EM: 1 CONTEXT: pv guest

(XEN) rax: 0000000000000286   rbx: 0000000000000000   rcx: 0000000000040000
(XEN) rdx: 0000000000004000   rsi: ffffffff8178de68   rdi: ffffffff816bb8ad
(XEN) rbp: ffffffff8178dda8   rsp: ffffffff8178dd60   r8:  0000000000000000
(XEN) r9:  0000000000000000   r10: 0000000000000000   r11: 0000000000000000
(XEN) r12: ffffffff816bb8ad   r13: 0000000000000004   r14: ffffffff8178de68
(XEN) r15: ffffffff8178dfb8   cr0: 000000008005003b   cr4: 00000000000026f4
(XEN) cr3: 0000000171361000   cr2: 0000000000000000
(XEN) ds: 0000   es: 0000   fs: 0000   gs: 0000   ss: e02b   cs: e033
(XEN) Guest stack trace from rsp=ffffffff8178dd60:
(XEN)    0000000000040000 0000000000000000 0000000000000000 ffffffff81034a14
(XEN)    000000010000e030 0000000000010082 ffffffff8178dda8 000000000000e02b
(XEN)    0000000000000286 ffffffff8178de58 ffffffff810610ea 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000286
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 ffffffff818c3000
(XEN)    0000000000000000 0000000000000080 ffffffff8178dfb8 ffffffff8178df38
(XEN)    ffffffff81546ab8 0000003000000008 ffffffff8178df48 ffffffff8178de88
(XEN)    0000000000000000 0000000000000000 0000000000040000 0000000000004000
(XEN)    0000000000040000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 ffffffff8178dfa8
(XEN)    ffffffff818da4a9 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 ffffffff8178df50 0000008000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 ffffffff8178dfd8 ffffffff81020c82 ffff818c3000007f
(XEN)    ffffffff818dffff 0000000000000000 0000000000000000 ffffffff8178dff8

###############################################################################

0xffffffff818da3de <xen_load_gdt_boot+0>:       push   %rbp
0xffffffff818da3df <xen_load_gdt_boot+1>:       mov    %rsp,%rbp
0xffffffff818da3e2 <xen_load_gdt_boot+4>:       push   %r15
0xffffffff818da3e4 <xen_load_gdt_boot+6>:       push   %r14
0xffffffff818da3e6 <xen_load_gdt_boot+8>:       push   %r13
0xffffffff818da3e8 <xen_load_gdt_boot+10>:      push   %r12
0xffffffff818da3ea <xen_load_gdt_boot+12>:      push   %rbx
0xffffffff818da3eb <xen_load_gdt_boot+13>:      sub    $0x18,%rsp
0xffffffff818da3ef <xen_load_gdt_boot+17>:      mov    %rdi,-0x38(%rbp)
0xffffffff818da3f3 <xen_load_gdt_boot+21>:      movzwl (%rdi),%eax
0xffffffff818da3f6 <xen_load_gdt_boot+24>:      mov    0x2(%rdi),%r12
0xffffffff818da3fa <xen_load_gdt_boot+28>:      add    $0x1,%eax
0xffffffff818da3fd <xen_load_gdt_boot+31>:      mov    %eax,%r15d
0xffffffff818da400 <xen_load_gdt_boot+34>:      mov    %eax,-0x2c(%rbp)
0xffffffff818da403 <xen_load_gdt_boot+37>:      lea    0xfff(%r15),%rax
0xffffffff818da40a <xen_load_gdt_boot+44>:      shr    $0xc,%rax
0xffffffff818da40e <xen_load_gdt_boot+48>:      lea    0x1e(,%rax,8),%rax
0xffffffff818da416 <xen_load_gdt_boot+56>:      and    $0x7f0,%eax
0xffffffff818da41b <xen_load_gdt_boot+61>:      sub    %rax,%rsp
0xffffffff818da41e <xen_load_gdt_boot+64>:      lea    0xf(%rsp),%r14
0xffffffff818da423 <xen_load_gdt_boot+69>:      and    $0xfffffffffffffff0,%r14
0xffffffff818da427 <xen_load_gdt_boot+73>:      test   $0xfff,%r12d
0xffffffff818da42e <xen_load_gdt_boot+80>:      jne    0xffffffff818da4ea <xen_load_gdt_boot+268>
0xffffffff818da434 <xen_load_gdt_boot+86>:      mov    %r15,%rax
0xffffffff818da437 <xen_load_gdt_boot+89>:      add    0x2(%rdi),%rax
0xffffffff818da43b <xen_load_gdt_boot+93>:      xor    %r13d,%r13d
0xffffffff818da43e <xen_load_gdt_boot+96>:      cmp    %rax,%r12
0xffffffff818da441 <xen_load_gdt_boot+99>:      jb     0xffffffff818da4ae <xen_load_gdt_boot+208>
0xffffffff818da443 <xen_load_gdt_boot+101>:     jmpq   0xffffffff818da4f6 <xen_load_gdt_boot+280>
0xffffffff818da448 <xen_load_gdt_boot+106>:     cmpq   $0x0,-0xa3d10(%rip)        # 0xffffffff81836740 <pv_mmu_ops+224>
0xffffffff818da450 <xen_load_gdt_boot+114>:     mov    -0x21fb7(%rip),%rax        # 0xffffffff818b84a0 <__supported_pte_mask>
0xffffffff818da457 <xen_load_gdt_boot+121>:     je     0xffffffff818da4f2 <xen_load_gdt_boot+276>
0xffffffff818da45d <xen_load_gdt_boot+127>:     mov    $0x8000000000000161,%rdx
0xffffffff818da467 <xen_load_gdt_boot+137>:     shl    $0xc,%rbx
0xffffffff818da46b <xen_load_gdt_boot+141>:     and    %rdx,%rax
0xffffffff818da46e <xen_load_gdt_boot+144>:     or     %rax,%rbx
0xffffffff818da471 <xen_load_gdt_boot+147>:     mov    %rbx,%rdi
0xffffffff818da474 <xen_load_gdt_boot+150>:     callq  *0xffffffff81836740
0xffffffff818da47b <xen_load_gdt_boot+157>:     xor    %edx,%edx
0xffffffff818da47d <xen_load_gdt_boot+159>:     mov    %r12,%rdi
0xffffffff818da480 <xen_load_gdt_boot+162>:     mov    %rax,%rsi
0xffffffff818da483 <xen_load_gdt_boot+165>:     callq  0xffffffff810091c0 <hypercall_page+448>
0xffffffff818da488 <xen_load_gdt_boot+170>:     test   %eax,%eax
0xffffffff818da48a <xen_load_gdt_boot+172>:     jne    0xffffffff818da4ee <xen_load_gdt_boot+272>
0xffffffff818da48c <xen_load_gdt_boot+174>:     mov    -0x38(%rbp),%rdx
0xffffffff818da490 <xen_load_gdt_boot+178>:     movslq %r13d,%rax
0xffffffff818da493 <xen_load_gdt_boot+181>:     add    $0x1000,%r12
0xffffffff818da49a <xen_load_gdt_boot+188>:     mov    %rcx,(%r14,%rax,8)
0xffffffff818da49e <xen_load_gdt_boot+192>:     mov    %r15,%rax
0xffffffff818da4a1 <xen_load_gdt_boot+195>:     add    0x2(%rdx),%rax
0xffffffff818da4a5 <xen_load_gdt_boot+199>:     cmp    %r12,%rax
0xffffffff818da4a8 <xen_load_gdt_boot+202>:     jbe    0xffffffff818da4f6 <xen_load_gdt_boot+280>
0xffffffff818da4aa <xen_load_gdt_boot+204>:     add    $0x1,%r13d
0xffffffff818da4ae <xen_load_gdt_boot+208>:     mov    %r12,%rdi
0xffffffff818da4b1 <xen_load_gdt_boot+211>:     callq  0xffffffff81040e90 <__phys_addr>
0xffffffff818da4b6 <xen_load_gdt_boot+216>:     mov    %rax,%rbx
0xffffffff818da4b9 <xen_load_gdt_boot+219>:     shr    $0xc,%rbx
0xffffffff818da4bd <xen_load_gdt_boot+223>:     cmpb   $0x0,-0x1f802(%rip)        # 0xffffffff818bacc2 <xen_features+2>
0xffffffff818da4c4 <xen_load_gdt_boot+230>:     mov    %rbx,%rcx
0xffffffff818da4c7 <xen_load_gdt_boot+233>:     jne    0xffffffff818da448 <xen_load_gdt_boot+106>
0xffffffff818da4cd <xen_load_gdt_boot+239>:     mov    %rbx,%rdi
0xffffffff818da4d0 <xen_load_gdt_boot+242>:     callq  0xffffffff8100cac0 <get_phys_to_machine>
0xffffffff818da4d5 <xen_load_gdt_boot+247>:     mov    %rax,%rcx
0xffffffff818da4d8 <xen_load_gdt_boot+250>:     mov    $0xffffffff7fffffff,%rax
0xffffffff818da4e2 <xen_load_gdt_boot+260>:     and    %rax,%rcx
0xffffffff818da4e5 <xen_load_gdt_boot+263>:     jmpq   0xffffffff818da448 <xen_load_gdt_boot+106>
0xffffffff818da4ea <xen_load_gdt_boot+268>:     ud2a
0xffffffff818da4ec <xen_load_gdt_boot+270>:     jmp    0xffffffff818da4ec <xen_load_gdt_boot+270>
0xffffffff818da4ee <xen_load_gdt_boot+272>:     ud2a
0xffffffff818da4f0 <xen_load_gdt_boot+274>:     jmp    0xffffffff818da4f0 <xen_load_gdt_boot+274>
0xffffffff818da4f2 <xen_load_gdt_boot+276>:     ud2a
0xffffffff818da4f4 <xen_load_gdt_boot+278>:     jmp    0xffffffff818da4f4 <xen_load_gdt_boot+278>
0xffffffff818da4f6 <xen_load_gdt_boot+280>:     shrl   $0x3,-0x2c(%rbp)
0xffffffff818da4fa <xen_load_gdt_boot+284>:     mov    %r14,%rdi
0xffffffff818da4fd <xen_load_gdt_boot+287>:     movslq -0x2c(%rbp),%rsi
0xffffffff818da501 <xen_load_gdt_boot+291>:     callq  0xffffffff81009040 <hypercall_page+64>
0xffffffff818da506 <xen_load_gdt_boot+296>:     test   %eax,%eax
0xffffffff818da508 <xen_load_gdt_boot+298>:     je     0xffffffff818da50e <xen_load_gdt_boot+304>
0xffffffff818da50a <xen_load_gdt_boot+300>:     ud2a
0xffffffff818da50c <xen_load_gdt_boot+302>:     jmp    0xffffffff818da50c <xen_load_gdt_boot+302>
0xffffffff818da50e <xen_load_gdt_boot+304>:     lea    -0x28(%rbp),%rsp
0xffffffff818da512 <xen_load_gdt_boot+308>:     pop    %rbx
0xffffffff818da513 <xen_load_gdt_boot+309>:     pop    %r12
0xffffffff818da515 <xen_load_gdt_boot+311>:     pop    %r13
0xffffffff818da517 <xen_load_gdt_boot+313>:     pop    %r14
0xffffffff818da519 <xen_load_gdt_boot+315>:     pop    %r15
0xffffffff818da51b <xen_load_gdt_boot+317>:     leaveq
0xffffffff818da51c <xen_load_gdt_boot+318>:     retq

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#4 lore raw
Quoted 3 lines · Dulloor

* jeremy pvops git (with SMP) - Your patch works. I had commented out detect_extended_topology as a work-around.

OK, good.

Quoted 7 lines

* jeremy pvops git (without SMP) - Build fails at link time, since "register_task_migration_notifier" definition is guarded by CONFIG_SMP (rightly so). This function is used in pvclock_init_vsyscall. Should the call in pvclock_init_vsyscall be guarded by CONFIG_SMP or should another "dummy" version of register_task_migration_notifier be defined for !CONFIG_SMP.

Yes, the second sounds like the right answer.

Quoted 10 lines

* Linus' git - Nothing on Linux console. Crash rip [BUG()] - (gdb) x/i 0xffffffff818da4ee
0xffffffff818da4ee <xen_load_gdt_boot+272>: ud2a

Crash is because HYPERVISOR_update_va_mapping fails.

I have attached the "xm dmesg", which also shows the error(in mm.c) leading to the crash. If you can't think of any existing problem, I will spend time debugging tomorrow.

Its not at all clear to me what Xen is objecting to here. There are a few paths where it can end up at could_not_pin in get_page_from_l1e(), but I don't know which one is happening here. I think it's the "if ( unlikely(real_pg_owner != pg_owner) )" conditional, but I don't know what real_pg_owner means here.

Keir?

J

#5 lore raw
Quoted 7 lines · Jeremy Fitzhardinge

Its not at all clear to me what Xen is objecting to here. There are a few paths where it can end up at could_not_pin in get_page_from_l1e(), but I don't know which one is happening here. I think it's the "if ( unlikely(real_pg_owner != pg_owner) )" conditional, but I don't know what real_pg_owner means here.

Keir?

If you fail that test it means that the page does not belong to the domain that the caller expected. In most cases, that means it was expected to belong to the domain making the hypercall, but actually it does not belong to it.

-- Keir

#6 lore raw
Quoted 9 lines · Keir Fraser
Quoted 6 lines · Jeremy Fitzhardinge

Its not at all clear to me what Xen is objecting to here. There are a few paths where it can end up at could_not_pin in get_page_from_l1e(), but I don't know which one is happening here. I think it's the "if ( unlikely(real_pg_owner != pg_owner) )" conditional, but I don't know what real_pg_owner means here.

Quoted 6 lines
Quoted 2 lines

Keir?

If you fail that test it means that the page does not belong to the domain that the caller expected. In most cases, that means it was expected to belong to the domain making the hypercall, but actually it does not belong to it.

The domain is calling update_va_mapping() on itself, and everything seems to be owned by the domain:

(XEN) mm.c:840:d33 Error getting mfn 18c3 (pfn 21603) from L1 entry 80000000018c3061 for l1e_owner=33, pg_owner=33

The three paths that lead to could_not_pin are:

    if ( real_pg_owner == NULL )
        goto could_not_pin;
...
    if ( unlikely(real_pg_owner != pg_owner) )
    {
        if ( (pg_owner == l1e_owner) || !IS_PRIV_FOR(pg_owner, real_pg_owner) )
            goto could_not_pin;
        pg_owner = real_pg_owner;
    }

and

    if ( (l1f & _PAGE_RW) &&
         ((l1e_owner == pg_owner) || !paging_mode_external(pg_owner)) &&
         !get_page_type(page, PGT_writable_page) )
        goto could_not_pin;

The pte doesn't have RW set, so it must be one of the first two. Could it be read_pg_owner == NULL?

J

#7 lore raw
Quoted 2 lines · Jeremy Fitzhardinge

The pte doesn't have RW set, so it must be one of the first two. Could it be read_pg_owner == NULL?

If real_pg_owner==NULL, that means the page belongs to noone (it is on Xen's free list). From guest p.o.v. It isn't really any different to real_pg_owner!=pg_owner -- in fact the test could probably be pushed inside the latter if stmt and would make the code clearer.

-- Keir